package com.ltx.blog_bam.service;

import com.ltx.blog_bam.mapper.ojTableMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class ojTableService {
    @Autowired
    private ojTableMapper ojTableMapper;

    public void tianjia(String topic, String difficulty, String label, String description, String expected_output){
        int id= (int) ((Math.random() * 9 + 1) * 100000);
        ojTableMapper.tianjia(id,topic,difficulty,label,description,expected_output,new Date());
    }

}
